<?php
error_reporting(0);
header("Content-Type: text/html; charset=utf-8"); 
$key=$_GET["id"];
if($key==""){$key=$_GET["key"];};
$type=$_GET["type"];
include_once("zhiboconfig.php");//配置文件

//判断防盗链
if(!is_referer(REFERER_URL)){
	//header('HTTP/1.1 403 Forbidden');
	exit('<iframe border="0" src="#" width="98%" height="100%" marginWidth="0" frameSpacing="0" marginHeight="0" frameBorder="0" scrolling="no" vspale="0" noResize></iframe>');//盗链域名显示
}
//判断防盗链域名
function is_referer($domain){
	//没有设置防盗链
    if($domain=='') return true;
	$referer = strtolower($_SERVER['HTTP_REFERER']);
	$agent = strtoupper($_SERVER['HTTP_USER_AGENT']);
	//部分手机浏览器没有来路
	if(empty($referer)){
		//if(preg_match("/(iPhone|iPad|iPod|Android|Linux)/i", $agent)){
            return true;
		//}
	}else{
	    //开始验证
        $ext = explode("|",$domain);
        for($i=0;$i<count($ext);$i++){
		    if(strpos($referer,strtolower($ext[$i])) !== FALSE ){
               return true; 
            }
		}
	}
    return false;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<style type="text/css">body,html,div{background-color:black;padding: 0;margin: 0;width:98%;height:100%;}</style>
</head>
<body>
<div id="video"><div id="a1"></div></div>
<script type="text/javascript" src="/ck/ckplayer.js" charset="utf-8"></script>
<script type="text/javascript">
var flashvars={
   f:'http://hpull.kktv8.com/livekktv/<?php echo $key ?>/playlist.m3u8',
   c:0,
   p:1
};
    var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always',wmode:'transparent'};
	var video=['http://hpull.kktv8.com/livekktv/<?php echo $key ?>/playlist.m3u8'];
    CKobject.embed('/ck/ckplayer.swf','a1','ckplayer_a1','100%','100%',false,flashvars,video,params);
</script>
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1257683708'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s95.cnzz.com/z_stat.php%3Fid%3D1257683708' type='text/javascript'%3E%3C/script%3E"));</script>
</body>
</html>